package com.bj58.data.hadoop.info.dimension;

import java.util.HashMap;
import java.util.Map;

import com.bj58.data.hadoop.info.entry.InfoEntry;

public abstract class IDimension {
	
	/*维度的rowKey前缀*/
	protected String rowKeyPrefix;

	/*保存需要统计的维度和对应值,容器*/
	protected Map<String,String> careValues = new HashMap<String,String>();
	
	protected Integer sortID;
	
	public Integer getSortID() {
		return sortID;
	}


	public String getRowKeyPrefix() {
		return rowKeyPrefix;
	}

	public Map<String, String> getCareValues() {
		return careValues;
	}

	/*设置维度关系的值*/
	public abstract void setCareValues(String values);
	
	/*判断当前信息是否在我们要获取的范围列表中*/
	public abstract boolean inCareValues(InfoEntry infoEntry);
	
	/*获取RowKey*/
	public abstract String getRowKey(InfoEntry infoEntry);
	
	/*获取字段的值*/
	public String getValue(InfoEntry infoEntry,String field) {
		// TODO Auto-generated method stub
		if(infoEntry != null)
		{
			return infoEntry.getUserID();
		}
		return "";
	}
}
